package com.mrd.gtimpframe.repository;

import com.mrd.gtimpframe.entity.DictionaryGroup;
import com.mrd.gtimpframe.vo.DictionaryGroupVO;

import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface DictionaryGroupMapper {
    int deleteByPrimaryKey(String id);

    int insert(DictionaryGroup record);

    int insertSelective(DictionaryGroup record);

    DictionaryGroup selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(DictionaryGroup record);

    int updateByPrimaryKey(DictionaryGroup record);

    List<DictionaryGroup> selectByCodesIn(List<String> codes);

    List<DictionaryGroup> selectWithDictionaryByCodesIn(List<String> codes);

    DictionaryGroup selectWithDictionaryByPrimaryKey(String id);

    /**
     * 查找所有字典组
     *
     * @param justValid true：去除注销的数据 false：包含注销的数据
     * @return List<DictionaryGroup>
     */
    List<DictionaryGroup> selectAll(@Param("_justValid") boolean justValid);

    /**
     * 查找所有字典组
     *
     * @param justValid true：去除注销的数据 false：包含注销的数据
     * @return List<DictionaryGroup>
     */
    List<DictionaryGroupVO> selectAllForView(@Param("_justValid") boolean justValid);

    DictionaryGroup selectByCode(String code);

    List<DictionaryGroup> selectIdAndNameFromValidAndTopGroup();

    List<DictionaryGroupVO> selectByMap(Map<String, Object> params);
}
